﻿/* mvcForum
 * Copyright (C) 2010-2011 Steen F. Tøttrup
 * http://mvcforum.org/
 */

using System;

using mvcForum.Core;
using mvcForum.Web.Attributes;

namespace mvcForum.Web.ViewModels {

	public class UserViewModel : ForumViewModelBase {

		public UserViewModel(ForumUser user/*, ForumUserSettings settings*/) : base() {
			this.Culture = user.Culture;
			this.Timezone = user.Timezone;
			this.FullName = user.FullName;
			this.LastIP = user.LastIP;
			this.UserFlag = user.UserFlag;
			this.Name = user.Name;
			this.FirstVisit = user.FirstVisit;
			//this.FirstVisit = user.Created;
			this.Email = user.EmailAddress;
			this.Id = user.Id;
			this.LastVisit = user.LastVisit;
		}

		public Int32 Id { get; private set; }
		public String Culture { get; set; }
		public String Timezone { get; set; }
		[LocalizedDisplay(typeof(mvcForum.Web.ViewModels.UserViewModel), "FullName")]
		public String FullName { get; set; }
		public String LastIP { get; private set; }
		public UserFlag UserFlag { get; private set; }
		[LocalizedDisplay(typeof(mvcForum.Web.ViewModels.UserViewModel), "Name")]
		public String Name { get; private set; }
		[LocalizedDisplay(typeof(mvcForum.Web.ViewModels.UserViewModel), "FirstVisit")]
		public DateTime FirstVisit { get; private set; }
		[LocalizedDisplay(typeof(mvcForum.Web.ViewModels.UserViewModel), "LastVisit")]
		public DateTime LastVisit { get; private set; }
		[LocalizedDisplay(typeof(mvcForum.Web.ViewModels.UserViewModel), "Email")]
		public String Email { get; set; }
	}
}